﻿using UnityEngine;
using System.Collections;

public class UpdateColor : MonoBehaviour {
	private GameObject level;

	// Use this for initialization
	void Start () {
		level = GameObject.Find("Level");
	}
	
	// Update is called once per frame
	void Update () {
		if(level.transform.up == Vector3.up) {
			renderer.material.color = new Color(0,1,0,0.3f);
		} else {
			renderer.material.color = new Color(1,0,0,0.7f);
		}
	}
}
